#!/usr/bin/python

import sys
from time import sleep

def main():
	'''Replay a log file one line at a time with delays.'''
	if len(sys.argv) < 2:
		sys.stderr.write("Usage: " + sys.argv[0] + " <infile>\n")

	with open(sys.argv[1], "r") as infile:
		for line in infile:
			sys.stdout.write(line)
			sys.stdout.flush()
			sleep(1)


if __name__ == '__main__':
	main()
